import tkinter
from PIL import ImageTk
import sys

try:
    media_file = sys.argv[1]
except:
    media_file = 'test.jpg'

class APP:
    def __init__(self, t):
        global photo 
        photo = ImageTk.PhotoImage(file=media_file) 
        image_label = tkinter.Label(t, image=photo)
        image_label.pack()


if __name__ == '__main__':
    root = tkinter.Tk()
    app = APP(root)
    root.mainloop()

